import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store/index'
import 'ant-design-vue/es/message/style/css';

import 'animate.css'

// markdown
import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';

import VMdPreviewHtml from '@kangc/v-md-editor/lib/preview-html';
import '@kangc/v-md-editor/lib/style/preview-html.css';

import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';

// 代码高亮
import Prism from 'prismjs';

// 代码行号
import createLineNumbertPlugin from '@kangc/v-md-editor/lib/plugins/line-number/index';

// 复制代码
import createCopyCodePreview from '@kangc/v-md-editor/lib/plugins/copy-code/preview';
import createCopyCodePlugin from '@kangc/v-md-editor/lib/plugins/copy-code/index';
import '@kangc/v-md-editor/lib/plugins/copy-code/copy-code.css';

// emoji
import createEmojiPlugin from '@kangc/v-md-editor/lib/plugins/emoji/index';
import '@kangc/v-md-editor/lib/plugins/emoji/emoji.css';

// markdown-editor
VueMarkdownEditor
.use(vuepressTheme, {
    Prism,
    codeHighlightExtensionMap: {
        vue: 'html',
    },
    config: {
        toc: {
          includeLevel: [2,3, 4],
        },
    },
})
.use(createLineNumbertPlugin())
.use(createCopyCodePlugin())
.use(createEmojiPlugin())



// markdown-preview
VMdPreviewHtml.use(createCopyCodePreview());

const app = createApp(App)

app
.use(router)
.use(store)
.use(VueMarkdownEditor)
.use(VMdPreviewHtml)
.mount('#app');
